import Vue from 'vue'
import Vuex from 'vuex'
import getLqCommonData from "./modules/getLqTheadData"; //沥青仓碎石公共表头
import getTree from "./modules/getTree"; //沥青仓碎石公共表头


Vue.use(Vuex)

export default new Vuex.Store({
  state: {
    //这里放全局参数

    leftNameData:[
      // 试验机管理
      {
        title: "试验机管理",
        img: "iconfont icon-xitongguanli1",
        name: "testMachineManage",
        left: 0,
        children: [
          {
            title: "版本管理",
            path: "/versionManage",
            path2: "",
            name: "version",
            name2: "",
            img: "iconfont icon-shengchanguanli1",
            children: [],
            left: 50,
          },
          {
            title: "试验名称",
            path: "/testNameManage",
            path2: "",
            name: "testNameManage",
            name2: "",
            img: "iconfont icon-shengchanguanli1",
            children: [],
            left: 50,
          },
          {
            title: "设备管理",
            path: "/equipmentManage",
            path2: "",
            name: "equipmentManage",
            name2: "",
            img: "iconfont icon-shengchanguanli1",
            children: [],
            left: 50,
          },
        ],
      },
      // 异常数据处理
      {
        title: "异常数据处理",
        img: "iconfont icon-xitongguanli1",
        name: "abnormalDataProcessManage",
        left: 0,
        children: [
          {
            title: "数据处理",

            path: "/abnormalDataProcess",
            path2: "",
            name: "abnormalDataProcess",
            name2: "",
            img: "iconfont icon-shengchanguanli1",
            children: [],
            left: 50,
          },
        ],
      },
      // 待试验样品
      {
        title: "待试验样品",
        img: "iconfont icon-xitongguanli1",
        name: "sampleTestManage",
        left: 0,
        children: [
          {
            title: "水泥",
            path: "/cementTest",
            path2: "",
            name: "cementTest",
            name2: "",
            img: "iconfont icon-shengchanguanli1",
            children: [],
            left: 50,
          },
          {
            title: "钢筋",
            path: "/rebarTest",
            path2: "",
            name: "rebarTest",
            name2: "",
            img: "iconfont icon-shengchanguanli1",
            children: [],
            left: 50,
          },
          {
            title: "混凝土",
            path: "/concreteTest",
            path2: "",
            name: "concreteTest",
            name2: "",
            img: "iconfont icon-shengchanguanli1",
            children: [],
            left: 50,
          },
          {
            title: "砂浆",
            path: "/mortarTest",
            path2: "",
            name: "mortarTest",
            name2: "",
            img: "iconfont icon-shengchanguanli1",
            children: [],
            left: 50,
          },
          {
            title: "净浆",
            path: "/pastTest",
            path2: "",
            name: "pastTest",
            name2: "",
            img: "iconfont icon-shengchanguanli1",
            children: [],
            left: 50,
          },
          {
            title: "岩石",
            path: "/rockTest",
            path2: "",
            name: "rockTest",
            name2: "",
            img: "iconfont icon-shengchanguanli1",
            children: [],
            left: 50,
          },
          {
            title: "水稳",
            path: "/waterStabilityTest",
            path2: "",
            name: "waterStabilityTest",
            name2: "",
            img: "iconfont icon-shengchanguanli1",
            children: [],
            left: 50,
          },
        ],
      },
      // 试验数据监控
      {
        title: "试验数据监控",
        img: "iconfont icon-xitongguanli1",
        name: "testMonitorManage",
        left: 0,
        children: [
          {
            title: "水泥",
            path: "/cementMonitor",
            path2: "",
            name: "cementMonitor",
            name2: "",
            img: "iconfont icon-shengchanguanli1",
            children: [],
            left: 50,
          },
          {
            title: "钢筋",
            path: "/rebarMonitor",
            path2: "",
            name: "rebarMonitor",
            name2: "",
            img: "iconfont icon-shengchanguanli1",
            children: [],
            left: 50,
          },
          {
            title: "混凝土",
            path: "/concreteMonitor",
            path2: "",
            name: "concreteMonitor",
            name2: "",
            img: "iconfont icon-shengchanguanli1",
            children: [],
            left: 50,
          },
          {
            title: "砂浆",
            path: "/mortarMonitor",
            path2: "",
            name: "mortarMonitor",
            name2: "",
            img: "iconfont icon-shengchanguanli1",
            children: [],
            left: 50,
          },
          {
            title: "净浆",
            path: "/pastMonitor",
            path2: "",
            name: "pastMonitor",
            name2: "",
            img: "iconfont icon-shengchanguanli1",
            children: [],
            left: 50,
          },
          {
            title: "岩石",
            path: "/rockMonitor",
            path2: "",
            name: "rockMonitor",
            name2: "",
            img: "iconfont icon-shengchanguanli1",
            children: [],
            left: 50,
          },
          {
            title: "水稳",
            path: "/waterStabilityMonitor",
            path2: "",
            name: "waterStabilityMonitor",
            name2: "",
            img: "iconfont icon-shengchanguanli1",
            children: [],
            left: 50,
          },
        ],
      },
      // 试验数据处理
      {
        title: "试验数据处理",
        img: "iconfont icon-xitongguanli1",
        name: "testProcessManage",
        left: 0,
        children: [
          {
            title: "水泥",
            path: "/cementProcess",
            path2: "",
            name: "cementProcess",
            name2: "",
            img: "iconfont icon-shengchanguanli1",
            children: [],
            left: 50,
          },
          {
            title: "钢筋",
            path: "/rebarProcess",
            path2: "",
            name: "rebarProcess",
            name2: "",
            img: "iconfont icon-shengchanguanli1",
            children: [],
            left: 50,
          },
          {
            title: "混凝土",
            path: "/concreteProcess",
            path2: "",
            name: "concreteProcess",
            name2: "",
            img: "iconfont icon-shengchanguanli1",
            children: [],
            left: 50,
          },
          {
            title: "砂浆",
            path: "/mortarProcess",
            path2: "",
            name: "mortarProcess",
            name2: "",
            img: "iconfont icon-shengchanguanli1",
            children: [],
            left: 50,
          },
          {
            title: "净浆",
            path: "/pastProcess",
            path2: "",
            name: "pastProcess",
            name2: "",
            img: "iconfont icon-shengchanguanli1",
            children: [],
            left: 50,
          },
          {
            title: "岩石",
            path: "/rockProcess",
            path2: "",
            name: "rockProcess",
            name2: "",
            img: "iconfont icon-shengchanguanli1",
            children: [],
            left: 50,
          },
          {
            title: "水稳",
            path: "/waterStabilityProcess",
            path2: "",
            name: "waterStabilityProcess",
            name2: "",
            img: "iconfont icon-shengchanguanli1",
            children: [],
            left: 50,
          },
        ],
      },
      {
        title: "数据统计分析",
        img: "iconfont icon-xitongguanli1",
        name: "dataStatisticalAnalysisManage",
        left: 0,
        children: [
          {
            title: "混凝土质量趋势",
            path: "/concreteQuality",
            path2: "",
            name: "concreteQuality",
            img: "iconfont icon-shengchanguanli1",
            children: [],
            left: 50,
          },

          {
            title: "钢筋质量趋势",
            path: "/rebarQuality",
            path2: "",
            name: "rebarQuality",
            img: "iconfont icon-shengchanguanli1",
            children: [],
            left: 50,
          },
          {
            title: "水泥质量趋势",
            path: "/cementQuality",
            path2: "",
            name: "cementQuality",
            img: "iconfont icon-shengchanguanli1",
            children: [],
            left: 50,
          },
          {
            title: "砂浆质量趋势",
            path: "/mortarQuality",
            path2: "",
            name: "mortarQuality",
            img: "iconfont icon-shengchanguanli1",
            children: [],
            left: 50,
          },
          {
            title: "净浆质量趋势",
            path: "/pasteQuality",
            path2: "",
            name: "pasteQuality",
            img: "iconfont icon-shengchanguanli1",
            children: [],
            left: 50,
          },
        ],
      },
      // 系统管理
      {
        title: "系统管理",
        img: "iconfont icon-xitongguanli",
        name: "SysManage",
        left: 0,
        children: [
          {
            title: "组织机构",
            name: "BaseManage",
            img: "iconfont icon-gongcheng",

            left: 25,
            children: [
              {
                title: "机构管理",
                path: "/mechanism",
                path2: "",
                img: "iconfont icon-tongjibaobiao2",
                children: [],
                name: "CompanyManage",
                left: 70,
              },
              {
                title: "部门管理",
                path: "/department",
                path2: "",
                img: "iconfont icon-tongjibaobiao2",
                left: 70,
                children: [],
                name: "DepartmentManage",
              },
              {
                title: "岗位管理",
                path: "/postManagement",
                path2: "",
                children: [],
                name: "PostManage",
                img: "iconfont icon-tongjibaobiao2",
                left: 70,
              },
              {
                title: "角色管理",
                path: "/roleManagement",
                path2: "",
                children: [],
                name: "RoleManage",
                img: "iconfont icon-tongjibaobiao2",
                left: 70,
              },
              {
                title: "用户管理",
                path: "/user",
                path2: "",
                children: [],
                img: "iconfont icon-tongjibaobiao2",
                left: 70,
                name: "UserManage",
              },
            ],
          },
          {
            title: "数据字典",
            path: "/dictionaryPage",
            path2: "",
            name: "dictionaryPage",
            img: "iconfont icon-shengchanguanli1",
            children: [],
            left: 62,
          },
          {
            title: "敏捷开发",
            name: "minjManage",
            img: "iconfont icon-gongcheng",
            left: 25,
            children: [
              {
                title: "代码生成器",
                path: "/codeGenerator",
                path2: "",
                img: "iconfont icon-tongjibaobiao2",
                children: [],
                name: "codeGenerator",
                left: 70,
              },
            ],
          },
          {
            title: "系统功能",
            path: "/systemData",
            path2: "",
            name: "systemData",
            img: "iconfont icon-shengchanguanli1",
            children: [],
            left: 62,
          },
        ],
      },
    ],
    userInfo: JSON.parse(sessionStorage.getItem("monitorBack-userInfo")),
    // defaultDates: [this.getDay(-6), this.getDay(0)]
  },
  mutations: {
    //这里是set方法
    increase: function (state, data) {
      state.leftNameData = JSON.parse(data)
    },
    userInfoData: function (state, data) {
      state.userInfo = JSON.parse(data)
    }
  },
  actions: {

  },
  modules: {

    getTree, //树
    getLqCommonData, //沥青仓碎石公共表头
  }
})